<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h1 id="h4">hello vue</h1><br>

<input type="text" id="input" name="name" value="1"><br><br>

<button id="button" onclick="test()">点我</button>

</body>
</html>

<script>

    function test(){

        var text = document.getElementById("h4").textContent;
        console.log(text);

        var value = document.getElementById("input").value;
        value = parseInt(value) + 1;
        document.getElementById("input").value = value;

    }

</script>
